{include file="public/header" /}
<body>
<div class="x-body">
    <xblock>
        <a class="layui-btn"  target="_blank" href="{:url('')}"><i class="iconfont">&#xe718;</i> 框架页面</a>
        <!--<button class="layui-btn" onclick="x_admin_show('添加单据明细','{:url(\'index/Quoted/addquoted\',[\'quoteId\'=>$quoteId])}',500,600)"><i class="layui-icon"></i>选择订单</button>-->
        <button class="layui-btn"
                onclick="x_admin_show('选择订单','{:url(\'index/Quoted/selectOrder\',[\'quoteId\'=>$quoteId])}')"><i
                class="layui-icon"></i>添加订单</button>
        <span class="x-right" style="line-height:40px">共{$quotedCount}条 · 共{$quotedCount/25|getInt}页</span>
    </xblock>

    <div class="container-wrap">
        <div class="box-1">
            <table class="layui-table">
                <thead>
                <tr>
                    <th width="40px;">操作</th>
                    <th>报价明细</th>
                    <th>订单明细</th>
                    <th>外图编号</th>
                    <th>内图编号</th>
                    <th>产品名称</th>
                    <th>材料</th>
                    <th>形状</th>
                    <th>毛坯尺寸</th>
                    <th>图纸工艺</th>
                    <th>数量</th>
                    <th>单重(kg)</th>
                    <th>总重</th>
                    <th>单材料费</th>
                    <th>总材料费</th>
                    <th>精坯加工费</th>
                    <th>工序和定额</th>
                    <th>加工单价</th>
                    <th>加工总价</th>
                    <th>利润率</th>
                    <th>管理费率</th>
                    <th>税率</th>
                    <th>产品单价</th>
                    <th>含税单价</th>
                    <th>产品总价</th>
                    <th>确认单价</th>
                    <th>备注</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th>最后修改人</th>
                    <th>修改时间</th>
                </tr>
                </thead>
                {if $quotedCount}
                <tbody>
                {volist name="quoted" id="quotedList"}
                <tr>
                    <td class="td-manage" width="50px;"><!-- 这里是设备管理里面某个设备的维修记录表-->
                        <!--<a title="编辑"onclick="x_admin_show('修改报价','')" href="javascript:;">-->
                            <!--<i style="color: green" class="layui-icon"></i>-->
                        <!--</a>-->
                        <a title="删除" onclick="delete_(this,'{$quotedList.id}')" href="javascript:;">
                            <i  style="color:red;" class="layui-icon"></i>
                        </a>
                    </td>
                    <td>{$quotedList.quote_info_id}</td>
                    <td>{$quotedList.order_info_id}</td>
                    <td>{$quotedList.waitu_id}</td>
                    <td>{$quotedList.neitu_id}</td>
                    <td>{$quotedList.chanpin_name}</td>
                    <td>{$quotedList.cailiao}</td>
                    <td>{$quotedList.xingzhuang}</td>
                    <td>{$quotedList.chicun}</td>
                    <?php $blueprintInfoList = getblueprintInfoList($quotedList['tuzhimingxiid']);?>
                    <td class="td-manage">
                        {if $blueprintInfoList.files_state==0||$blueprintInfoList.drawing_externa_id==""||!widget('Widget/drawing_check',['drawing_id'=>$blueprintInfoList.drawing_externa_id])}<!-- 不继承或者外图继承无效 -->
                        <a title="图纸" onclick="x_admin_show('图纸明细 <span class=\'layui-badge layui-bg-blue\'>{$blueprintInfoList.drawing_detail_id}</span> 的图纸文件',
          '{:url(\'index/blueprint/is_DrawingFiles\',[\'id\'=>$blueprintInfoList.id,\'key\'=>\'wai\',\'drawing_num\'=>$blueprintInfoList.drawing_detail_id])}')" href="javascript:;">
                            <span class="layui-badge layui-bg-{:widget('Widget/files_check',['id'=>$blueprintInfoList.id,'tip'=>'abroad'])}">图</span></a>
                        {elseif $blueprintInfoList.files_state==1} <!-- 继承 -->
                        <a title="图纸" onclick="x_admin_show('图纸明细 <span class=\'layui-badge layui-bg-blue\'>{$blueprintInfoList.drawing_detail_id}</span> 的图纸文件',
          '{:url(\'index/blueprint/is_outDrawing\',[\'id\'=>$blueprintInfoList.drawing_externa_id])}')" href="javascript:;"><span class="layui-badge layui-bg-green">图</span></a>
                        {/if}
                        <a title="模型" onclick="x_admin_show('图纸明细 <span class=\'layui-badge layui-bg-blue\'>{$blueprintInfoList.drawing_detail_id}</span> 的3d模型文件',
          '{:url(\'index/blueprint/is_DrawingFiles\',[\'id\'=>$blueprintInfoList.id,\'key\'=>\'nei\',\'drawing_num\'=>$blueprintInfoList.drawing_detail_id])}')" href="javascript:;"><span class="layui-badge layui-bg-{:widget('Widget/files_check',['id'=>$blueprintInfoList.id,'tip'=>'within'])}">3D</span></a>
                        <a title="程序单" onclick="x_admin_show('图纸明细 <span class=\'layui-badge layui-bg-blue\'>{$blueprintInfoList.drawing_detail_id}</span> 的程序单文件',
          '{:url(\'index/blueprint/is_DrawingFiles\',[\'id\'=>$blueprintInfoList.id,\'key\'=>\'cheng\',\'drawing_num\'=>$blueprintInfoList.drawing_detail_id])}')" href="javascript:;"><span class="layui-badge layui-bg-green layui-bg-{:widget('Widget/files_check',['id'=>$blueprintInfoList.id,'tip'=>'engineering'])}">程</span></a>

                        {if $blueprintInfoList.is_gongxu !=0}
                        <a title="工"  href="javascript:;" onclick="x_admin_show('<span class=\'layui-badge layui-bg-blue\'>{$blueprintInfoList.drawing_detail_id}</span> 的工艺信息','{:url(\'index/blueprint/process\',[\'drawing_detail_id\'=>$blueprintInfoList.drawing_detail_id])}')" ><span class="layui-badge layui-bg-green">工</span></a>
                        {else}
                        <a title="工"  href="javascript:;" onclick="x_admin_show('<span class=\'layui-badge layui-bg-blue\'>{$blueprintInfoList.drawing_detail_id}</span> 的工艺信息','{:url(\'index/blueprint/process\',[\'drawing_detail_id\'=>$blueprintInfoList.drawing_detail_id])}')" ><span  class="layui-badge layui-bg-blue">工</span></a>
                        {/if}
                    </td>
                    <td>{$quotedList.shuliang}</td>
                    <td>{$quotedList.danzhong}</td>
                    <td>{$quotedList.zongzhong}</td>
                    <td>{$quotedList.dancailiaofeiyon}</td>
                    <td>{$quotedList.zongcailiaofeiyon}</td>
                    <td>{$quotedList.jingpijiagongfeiyon}</td>
                    <td>{$quotedList.gongxuanddinge}</td>
                    <td>{$quotedList.jiagongdanjia}</td>
                    <td>{$quotedList.jiagongzongjia}</td>
                    <td>{$quotedList.lirunlv}</td>
                    <td>{$quotedList.guanlifeilv}</td>
                    <td>{$quotedList.shuilv}</td>
                    <td>{$quotedList.chanpindanjia}</td>
                    <td>{$quotedList.hanshuidanjia}</td>
                    <td>{$quotedList.chanpinzongjia}</td>
                    <td>{$quotedList.querendanjia}</td>
                    <td>{$quotedList.beizhu}</td>
                    <td>1</td>
                    <td>2</td>
                    <td>3</td>
                    <td>4</td>
                    <td>5</td>
                </tr>
                {/volist}
                </tbody>
                {/if}
            </table>
        </div>
    </div>
</div>
<script>
    /*删除*/
    function delete_(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            var url = "{:url('index/Quoted/delete')}";
            var postData ={"id":id};
            $.post(url,postData,function (result) {
                if(result === 1){
                    $(obj).parents("tr").remove();
                    layer.msg('已删除!',{icon:1,time:1000});
                }else {
                    layer.alert("删除失败", {icon: 5});
                }
            },"json");
        });
    }
</script>
</body>
</html>